export default async ({ request }) => {
  const formData = await request.formData()
  const data = Object.fromEntries(formData)
  console.log(data, request.method, 4)
  const isRegistered = await window.api.shortcut(data.shortcut)
  if (isRegistered) {
    return await window.api.sql(`update config set content=@content where id=1`, 'update', {
      content: JSON.stringify(data)
    })
  }
  return {}
}
